﻿using System;
using WindowsLive;
using WindowsLive.Writer;
using WindowsLive.Writer.Api;
using System.Text;
using System.Text.RegularExpressions;
using FlickrNet;
using System.Windows.Forms;
using System.ComponentModel;

namespace TrailImage
{
	[InsertableContentSource("Synopsis"),
	 WriterPlugin("AD2957FA-9E19-11E1-B3E8-EE046188709B", "Synopsis",
		PublisherUrl = "http://idaho-adventure.com",
		Description = "Plugin for retrieving Flickr images",
		HasEditableOptions = false)]
	public class SynopsisPlugin : HeaderFooterSource
	{
		//<div class='post-body'><div class="story-summary">_Tyson and I spend the day riding our big bikes along Succor Creek, across the Owyhee River by the dam, stopping in Dry Creek gorge, then Juntura, Oregon, returning to Boise via Oregon Highway 20._</div>
		
		public override string GeneratePreviewHtml(ISmartContent smartContent, IPublishingContext publishingContext, out HeaderFooterSource.Position position)
		{
			position = Position.Header;
			smartContent.Layout.Alignment = Alignment.Center;

			return "Test Preview Header";
		}

		public override string GeneratePublishHtml(IWin32Window dialogOwner, ISmartContent smartContent, IPublishingContext publishingContext, bool publish, out HeaderFooterSource.Position position)
		{
			position = Position.Header;

			return "Test Publish Header";
		}
	}
}